import { Injectable, NestMiddleware } from '@nestjs/common';
import { Request, Response, NextFunction } from 'express';

/**
 * //todo:如果底层框架被我换成了fastify，那这里难道还得改，nestjs官方没考虑这个问题？？
 */
@Injectable()
export class LoggerDemoMiddleWare implements NestMiddleware {
  use(req: Request, res: Response, next: NextFunction) {
    console.log('get a request----');
    // console.log(req);
    // console.log(res);
    console.log('logger over-----');
    next();
  }
}
